<template>
  <div class="edit-box">
    <div class="image-item" v-if="formData.status_desc ==1"></div>
    <el-form label-width="120px" class="form-grid" :model="formData">
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="用户ID"><el-input v-model="formData.user_id" readonly /></el-form-item>
          <el-form-item label="姓名"><el-input v-model="formData.real_name" readonly /></el-form-item>
          <el-form-item label="电话"><el-input v-model="formData.tel" readonly /></el-form-item>
          <el-form-item label="申请时间"><el-input v-model="formData.update_time" readonly /></el-form-item>

          <el-form-item label="培训备注" class="full-width">
            <el-input type="textarea" v-model="formData.resume" :rows="3" placeholder="" readonly />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div class="bt-box" v-if="formData.status_desc ==0"><el-button type="primary" round @click="handleOk" icon="el-icon-check" >通过培训</el-button></div>
  </div>
</template>



<script>
  import {
    TRAINING_STATUS
  } from '@/constants/statusMap';

  export default {
    name: "ReviewDetail",
    props: {
      formData: {
        type: Object,
        required: true
      }
    },
    data() {
      return {
        TRAINING_STATUS,
        remark: ""
      };
    },
    methods: {
      handleOk() {
        this.$emit('approve', {
         id: this.formData.id
        })

      }
    }
  }
</script>

<style scoped>
  .action-status {
    padding-left: 20px;
  }

  .edit-box {
    box-sizing: border-box;
    padding: 10px 40px 20px 10px;
    position: relative;

  }

  .image-item{
    width: 100%;
    height: 100%;
    position:absolute;
    background-image: url('https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0902/969ec202509021711332984.png');
    background-position: right bottom;
    background-repeat: no-repeat;
    z-index: 900;
  }

  .form-grid .el-form-item {
    margin-bottom: 20px;
  }

  .full-width {
    margin-top: 20px;
  }

  .full-width .el-input {

    width: 100%;
  }

  .btn-group {
    text-align: center;
  }

  .bt-box{
    margin: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
</style>
